#ifndef CpSimulator_h
#define CpSimulator_h

#include <TObject.h>
#include <TString.h>
#include <TTree.h>

#include "CpEvent.h"

class CpSimulator : public TObject
{
  public:
    CpSimulator();
    ~CpSimulator();
    
    void        Init();
    void        Finalize();

    void        Simulate();
    void        ShowEvent(const Long64_t &eventNum);
    
    Long64_t    GetNumberOfEvents() { return fNumberOfEvents;}
    void        SetNumberOfEvents(const Long64_t &num) { fNumberOfEvents = num;}

    Long64_t    GetNumberOfTracksInOneEvent() { return fNumberOfTracksInOneEvent;}
    void        SetNumberOfTracksInOneEvent(const Long64_t &num) { fNumberOfTracksInOneEvent = num;}

    void        SetOutputFileName(const TString &name) { fOutputFileName = name;}
    TString     GetOutputFileName() { return fOutputFileName;}

    void        SetGeometryFile(const TString &name) { fGeometryFile = name;}
    TString     GetGeometryFile() { return fGeometryFile;}

  private:
    
    Long64_t    fNumberOfEvents;
    Long64_t    fNumberOfTracksInOneEvent;

    TFile      *fCurrentFile;
    TString     fOutputFileName;

    TString     fGeometryFile;

    TTree       fTree;
    CpEvent    *fEvent;


    ClassDef(CpSimulator, 1);

};

#endif
